Fix SMTP email template when mark_success_url is undefined for RuntimeTaskInstance objects#54680
Fix SMTP email template when mark_success_url is undefined for RuntimeTaskInstance objects#54680potiuk merged 1 commit intoapache:mainfrom Kiretori:fix-email-template-mark-success-url
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
|
|
Would it be possible to add a unit test ? |
I don't think that's necessary for this change. I just added some guard rails with an existence check, if there are already some unit tests for the |
…eTaskInstance objects
Na.. It's ok . Templating is not as crucial to be tested. |
Okay, I guess it's ready to be merged now. |
|
Awesome work, congrats on your first merged pull request! You are invited to check our Issue Tracker for additional contributions. |
…eTaskInstance objects (apache#54680)
Closes: #53135
Added an existence check for
mark_success_urlin the default SMTP html template.The
TaskInstanceclass properly defines amark_success_urlproperty, while theRuntimeTaskInstanceclass used during task execution does not. This results in anUndefinedErrorwhen the email template tries to accessti.mark_success_urlon aRuntimeTaskInstanceobject.This change makes sure:
TaskInstanceobjects (which have the property)RuntimeTaskInstanceobjects (which don't have the property)